<?php
include '../class/Carrega.class.php';
include '../class/rFunc.class.php';

session_start();
if (isset($_SESSION['sessaousuario'])) {

    //   if($_SESSION['sessaousuario']->nivel >1){
    //      echo  '<script> alert("Nível do usuário não permitido \n contate suporte"); </script>  ';
    //      header("location: index.php");   // nivel nao permitido/errado > 1
    //   }

    $nome_usuario = $_SESSION['sessaousuario']->nome_usuario;
    $nivel = $_SESSION['sessaousuario']->nivel;
} else {
    header("location: index.php");   // não veio logado volta
}
?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br" lang="pt-br">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="shortcut icon" href="../imagens/faveicon.png" type="image/x-icon"/>
        <title>Administrativo MOBILE</title>
        <link href="../css/admin.css" rel="stylesheet"/>
        <link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet">
            <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
            <script type="text/javascript" src="http://netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
            <!--<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">-->
            <!--<script src="../js/jquery-2.1.0.min.js"></script>-->

            <script>
                $(document).ready(function() {

                });

            </script>
    </head>
    <body>
        <?php //include_once 'interna.php';
        ?>
        <div class="container">
            <div class="row">
                <div class="col-md-11">
                    <div class="navbar navbar-default ">
                        <style>
                            .body{padding-top:70px}
                        </style>
                        <div class="navbar-header">
                            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                                <span class="sr-only">Toggle navigation</span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </button>
                            <a class="navbar-brand" >Olá: <?php echo $nome_usuario; ?> Nivel:
                                <?php
                                switch ($nivel) {
                                    case 0:
                                        echo 'Administrador';
                                        break;

                                    case 1:
                                        echo 'Professor';
                                        break;
                                }
                                ?></a>
                        </div>
                        <div class="collapse navbar-collapse navbar-ex1-collapse">
                            <ul class="nav navbar-nav navbar-right">
                                <li><a href="interna.php">Principal</a></li>
                                <li><a href="usuario.php">Usuários</a></li>
                                <li><a href="instituicao.php">Instituições</a></li>
                                <li><a href="idioma.php">Idiomas</a></li>
                                <li><a href="pais.php">Países</a></li>
                                <li><a href="area.php">Área</a></li>
                                <li><a href="subarea.php">Sub-Área</a></li>
                                <li><a href="logout.php">Sair</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <hr>
        </div>
        <center><img src="../imagens/mobile-ifsul-wide-100.png" class="img-responsive img-rounded"></center>

